package com.youbug.system.schedule;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
public class JobExecutor extends AbstractJobExecutor{

    @Autowired
    private Map<String, AbstractJob> scheduleJobMap;

    @Scheduled(cron = "0 10 21 * * *")
    public void test(){
        doExec(scheduleJobMap.get("test"), true);
    }

    @Scheduled(cron = "0 20 21 * * *")
    public void copySysDataToRemote(){
        doExec(scheduleJobMap.get("copySysDataToRemote"), true);
    }
}
